-- GENERATED SPELL FOR [Nimar the Slayer] --


function spell0_2606(pUnit, Event) --@Cleave,n/a--
pUnit:FullCastSpellOnTarget(845,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_2606', 592, 1)
end

function spell1_2606(pUnit, Event) --@Whirlwind,Self--
pUnit:FullCastSpellOnTarget(15576,pUnit)
pUnit:RegisterEvent('Sorts_2606', 598, 1)
end

function spell2_2606(pUnit, Event) --@Whirlwind,Self--
pUnit:FullCastSpellOnTarget(17207,pUnit)
pUnit:RegisterEvent('Sorts_2606', 2000, 1)
end

function Sorts_2606(pUnit, Event)
local choix_sorts_2606 = math.random(0, 2)
if choix_sorts_2606 == 0 then
pUnit:RegisterEvent('spell0_2606', 1, 1)
end
if choix_sorts_2606 == 1 then
pUnit:RegisterEvent('spell1_2606', 1, 1)
end
if choix_sorts_2606 == 2 then
pUnit:RegisterEvent('spell2_2606', 1, 1)
end
end

function mob2606_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_2606', math.random(1500, 3000), 1)
end

function mob2606_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob2606_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob2606_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(2606, 1, 'mob2606_Action')
RegisterUnitEvent(2606, 2, 'mob2606_Leave')
RegisterUnitEvent(2606, 3, 'mob2606_Kill')
RegisterUnitEvent(2606, 4, 'mob2606_Die')
